package com.ych.modules.base.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ych.modules.base.dbEntity.TUserJobEntity;
import com.ych.modules.base.mapper.TUserJobMapper;
import com.ych.modules.base.service.ITUserJobService;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * Author: Usopp.tsui
 * Date: 2021/3/8
 * Time: 14:13
 * Description:
 */
@Service("ITUserJobService")
public class TUserJobServiceImpl extends ServiceImpl<TUserJobMapper, TUserJobEntity> implements ITUserJobService {
    @Override
    public void modifyJobResidueNumber(String jobId, Integer number) {
        Wrapper<TUserJobEntity> wrapper = new EntityWrapper<TUserJobEntity>()
                .where("1=1")
                .eq("job_id", jobId);
        this.updateForSet("residue_number = residue_number +(" + number + ")", wrapper);
    }
}
